<script lang="ts" setup>

import {Calendar, Delete, Edit, Message, QuestionFilled, Search} from "@element-plus/icons-vue";
import {reactive} from "vue";
import {ref} from "vue";
import type { ComponentSize } from 'element-plus'
const currentPage1 = ref(5)
const currentPage2 = ref(5)
const currentPage3 = ref(5)
const currentPage4 = ref(4)
const pageSize2 = ref(100)
const pageSize3 = ref(100)
const pageSize4 = ref(100)
const size = ref<ComponentSize>('default')
const background = ref(false)
const disabled = ref(false)

const handleSizeChange = (val: number) => {
  console.log(`${val} items per page`)
}
const handleCurrentChange = (val: number) => {
  console.log(`current page: ${val}`)
}
const data=reactive({
    input:null,
    fruits:['apple','banana','orange']
})
//导入assets下的图片
// import L01 from "./assets/lb01.jpg"
// import L02 from "./assets/lb02.jpg"
// import L03 from "./assets/lb03.jpg"
// const lb=reactive({
//   imgs:[L01,L02,L03]
// })
const tableData = [
  {
    id: '1',
    name: '学工部',
    createtime:'2025-06-09 20:47:37',
    updatetime:'2025-06-09 20:47:37'
  },
  {
    id: '2',
    name: '教研部',
    createtime:'2025-06-09 20:47:37',
    updatetime:'2025-06-09 20:47:37'
  },
  {
    id: '3',
    name: '咨询部',
    createtime:'2025-06-09 20:47:37',
    updatetime:'2025-06-09 20:47:37'
  },
  {
    id: '4',
    name: '就业部',
    createtime:'2025-06-09 20:47:37',
    updatetime:'2025-06-09 20:47:37'
  },
  {
    id: '5',
    name: '人事部',
    createtime:'2025-06-09 20:47:37',
    updatetime:'2025-06-09 20:47:37'
  }
]
</script>

<template>
  <div class="mb-4">
    <el-button>Default</el-button>
    <el-button type="primary" size="large">Primary</el-button>
    <el-button type="success" circle>Success</el-button>
    <el-button type="info" loading>Info</el-button>
    <el-button type="warning">Warning</el-button>
    <el-button type="danger">Danger</el-button>
  </div>
  <div style="margin: 30px">
    <el-icon :size="30">
      <Edit/>
    </el-icon>
    <el-icon :size="30">
      <Delete/>
    </el-icon>
    <el-icon :size="30">
      <Message/>
    </el-icon>
    <el-icon>
      <QuestionFilled />
    </el-icon>
<!--    结合el-button-->
    <el-button type="primary" :icon="Edit" circle></el-button>
    <el-button type="primary" :icon="Delete" circle></el-button>
    <el-button type="primary" :icon="Message" size="large"></el-button>
  </div>
<!--  el-input输入框-->
  <div style="margin: 30px">
    <el-input v-model="data.input" style="width: 240px" placeholder="请输入内容"
              :prefix-icon="Search" />{{data.input}}
    <el-input v-model="data.input" style="width: 240px" placeholder="请输入内容"
              :suffix-icon="Calendar" />{{data.input}}
    <el-input v-model="data.input" style="width: 240px" placeholder="请输入密码"
              type="password"/>{{data.input}}
    <el-input v-model="data.input" style="width: 240px" placeholder="请输入一段描述信息"
              type="textarea" :row="5"/>{{data.input}}
  </div>
  <div style="margin: 30px">
    <el-select v-model="data.fruits" placeholder="请选择">
      <el-option v-for="item in data.fruits" :key="item" :label="item" :value="item"></el-option>
    </el-select>
  </div>
<!--  <div style="margin: 30px">-->
<!--    <el-carousel height="300px" style="width: 500px">-->
<!--      <el-carousel-item v-for="item in lb.imgs" :key="item">-->
<!--        <img :src="item" style="width: 100%">-->
<!--      </el-carousel-item>-->
<!--    </el-carousel>-->
<!--  </div>-->
  <div style="margin: 30px">
    <el-table :data="tableData" style="width: 100%">
      <el-table-column prop="id" label="Id" width="180" />
      <el-table-column prop="name" label="Name" width="180" />
      <el-table-column prop="createtime" label="createTime" />
      <el-table-column prop="updatetime" label="updateTime" />
    </el-table>
  </div>
  <div style="margin: 30px">
    <el-pagination
        v-model:current-page="currentPage4"
        v-model:page-size="pageSize4"
        :page-sizes="[100, 200, 300, 400]"
        :size="size"
        :disabled="disabled"
        :background="background"
        layout="total, sizes, prev, pager, next, jumper"
        :total="400"
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
    />
  </div>
</template>

<style scoped>

</style>